package edu.hgnc.factoryBean;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

public class UserD {
    private String username;
    private Integer age;

	public UserD(String username, Integer age) {
		this.username = username;
		this.age = age;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public UserD(){
        System.out.println("1.通过无参构造方法实例化");
    }

	@Override
	public String toString() {
		return "UserD{" +
				"username='" + username + '\'' +
				", age=" + age +
				'}';
	}
}
